package com.zhongc.advance.common.log;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


/**
 * @author yanhl
 *  2015-5-30
 *  上午10:01:02
 *
 */
public class LogbackContextLoaderListener implements ServletContextListener {
	
	@Override
	public void contextDestroyed(ServletContextEvent contextEvent) {
		
	}

	@Override
	public void contextInitialized(ServletContextEvent contextEvent) {
		ServletContext context = contextEvent.getServletContext();
//		String location = context.getRealPath(Env.analyze(context.getInitParameter("logbackContextConfigLocation")));
//		System.out.println("logbackContextConfigLocation:" + location);
//		Log.configure(location);
	}

}
